package com.ruoyi;

import cnhy.salary.SalaryMain;
import com.github.fppt.jedismock.RedisServer;
import ling.LingMain;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

import java.io.IOException;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@ComponentScan(basePackageClasses = {RuoYiApplication.class, SalaryMain.class, LingMain.class})
@MapperScan("cnhy.**.mapper")
public class RuoYiApplication {
    public static void main(String[] args) {

        try {
            RedisServer.newRedisServer(6379).start();
            System.out.println("---缓存服务启动---");
        } catch (IOException e) {
            //throw new RuntimeException(e);
            System.out.println("---内置缓存未启动---"+e.getMessage());
        }
        System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(RuoYiApplication.class, args);
        System.out.println("---启动成功---");
    }
}
